<div style="margin-top:30px; "></div>
<div class="container"> 
	<div class="row">
	  <div class="col-xs-3">
	  	<div>
			<div class="list-group">
				<a href="#/user/profile" class="list-group-item">
					我的资料
				</a>
				<a href="#/user/device" class="list-group-item active">
					我的设备
				</a>
				<a href="#/user/device/bind" class="list-group-item">绑定设备</a>
			</div>
	  	</div>
	  </div>
	  <div class="col-xs-9 ">

	  	<div class="panel panel-primary">
	      <div class="panel-heading">
	        <h3 class="panel-title">我的设备</h3>
	      </div>
	      <div class="panel-body">

			  <table class="table table-hover">
				  <thead>
				  <tr>
					  <th>序号</th>
					  <th>设备名称</th>
					  <th>设备标识</th>
					  <th>状态</th>
					  <th width="200">操作</th>
				  </tr>
				  </thead>
				  <tbody>
				  <tr ng-repeat="item in list">
					  <td>{{item.id}}</td>
					  <td>{{item.name}}</td>
					  <td>{{item.deviceId}}</td>
					  <td>
						<span class="label label-success" ng-if="item.status == 1">在线</span>
						<span class="label label-default" ng-if="item.status != 1">离线</span>
					  </td>
					  <td>
						  <a ng-click="editDevice(item)" class="btn btn-info">编辑</a>
                          <a href="#/user/device/{{item.id}}/mapping" class="btn btn-default">端口映射</a>
					  </td>
				  </tr>
				  </tbody>
			  </table>
	      </div>
	    </div>

      </div>
	 	
	</div>
</div>




<!-- 编辑弹出框 -->
<div id="editDevice" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">编辑设备</h4>
            </div>
            <div class="modal-body">

                <form class="form-horizontal">
                    <div class="form-group">
                        <label for="a" class="col-sm-2 control-label">设备名称</label>
                        <div class="col-sm-6">
                            <input type="text" ng-model="item.name" class="form-control" id="a" placeholder="名称">
                        </div>
                        <div class="col-sm-4">

                        </div>
                    </div>
                    <div class="form-group">
                        <label for="b" class="col-sm-2 control-label">设备标识</label>
                        <div class="col-sm-6">
                            <input type="text" ng-model="item.deviceId"  class="form-control" id="b" placeholder="设备" readonly>
                        </div>

                        <div class="col-sm-4">
                            <!--<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span>-->
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c" class="col-sm-2 control-label">创建时间</label>
                        <div class="col-sm-6">
                            <input type="text" ng-model="item.createTimeStr"  class="form-control" id="c" readonly>
                        </div>
                        <div class="col-sm-4"></div>
                    </div>

                </form>

            </div>
            <div class="modal-footer">
                <a ng-click="save()" class="btn btn-default">保 存</a>
                <a ng-click="exit()"  class="btn btn-default">取 消</a>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->